5. bottle filling and capping machine 5

好的,我们成功地编写了广播电台的代码,现在我们可以继续讨论机器人电台了。
OK, so we managed to write the code for the radio station, and right now we can move on to the robot station.

机器人站实际上比传送带站简单一点,但是我们没有任何嵌套的情况。
Robot station is actually a little bit simpler than the conveyor station, but we do not have any nested situations.

所以我们现在就研究一下这个问题。
So we will look into this right now.

我将打开右侧的可视化,我将重点关注机器人。
I will open the visualization here on the right and I will focus on the robot.

好的,从这里开始,我们禁用机器人。
OK, so starting from here, we have our robot disabled.

因此,和以前一样,我们需要接收开始,而不是停止,而不是整体,而不是紧急情况,以便进入新的状态。
So again, as before, we need to receive the start and not this stop and not the whole and not the emergency in order to move on to a new state.

在程序的这一部分中,我们将此状态称为等于 10,我们需要启用通用设备。
Let's call this state equal to 10 in this part of the program, we need to enable the generic devices.

因此,应通过机器人设置实现通用装置的机器人水平装置。
So robot horizontal device that enable generic device should be set up through the robot.

启用通用装置的垂直装置应设置为贯通,启用该装置的机器人抓手装置应设置为贯通。
The vertical device that enable generic device should be set through and the robot gripper device that enable the device should be set to through.

好的,现在我们可以看到我们需要实际执行的状态,比方说,机器人的归航过程。
OK, so here we get to see in state we need to actually carry out, let's say, the homing procedure for the robot.

所以我们需要确保我们的机器人处于正确的位置。
So we need to make sure that our robot is in the correct position.

因此,在这里我们需要实际移动机器人以拾取位置,同时具有。
So here we need to actually move the robot to pick up position while having the.

另外,夹具被禁用,所以这里我们将乘坐机器人水平装置,所以我们说禁用意味着向左移动。
Also, the grippers disabled, so here we will ride robot horizontal device, so we said that disabling means moving left.

所以机器人水平装置,应该设置强制机器人垂直装置。
So robot horizontal device, that device can should be set to force robot vertical device.

该设备可以而且应该设置为强制。
That device can and should be set to force.

还有机器人抓手。
And the robot gripper.

设备,该设备可以而且应该设置为强制。
Device, that device can and should be set to force.

好的,这里我们需要检查它们的状态是否全部变为禁用,因此实验室、水平设备、点设备状态应该等于,呃,禁用。
OK, here we need to check if all of their states become disabled, so laboratories, horizontal device, dot device state should be equal to, uh, disabled.

让我们看看新的生产线机器人垂直设备点设备状态也应该能够禁用。
And let's go to new line robot vertical device dot device state should be able to disabled as well.

以及机器人夹持装置。
And robot griper device.

该设备的设备状态应等于禁用。
That device device state should be equal to disabled.

那么我们的国家应该变得与任何人平等。
Then here our state should become equal to anyone.

状态 20,任意 20。
State 20, any 20.

我们这里有机器人。
We have the robot robot here.

我们只需要等待一些产品。
We just need to wait for some products.

因此,状态 20 将是​​我们必须等待产品的状态。
So State 20 will be the one in which we have to wait for product.

等待产品。
Wait for product.

所以如果有一个产品或者产品在拾取位置传感器上,那么我们可以在30年后进入另一个状态状态。
So if there is a product or product on pick up position sensor, then we can go to another state state 30 years later.

我们需要实际使用夹具来抓取产品。
We will need to actually use the gripper to grab the product.

所以这里我们右抓产品作为评论,保持30而不是30。
So here our right grab product as a comment, stay 30 instead 30.

我们将有罗伯特·格里珀(Robert Griper),该恶习将通过该恶习并设置,我们将等待状态启用。
We will have Robert Griper, the vice that the vice and set through and we will wait for the state to become enabled.

因此,机器人夹持器设备,该设备状态应该变为等于启用。
So robot griper device, that device state should become equal to enabled.

然后我们可以转到状态 40。
Then we can move to state 40.

好的,所以在状态 40 中,我们已经在该状态下抓取了产品,以便妇女开始移动到该杆以将瓶子放入垃圾箱中。
OK, so in state 40, we have grabbed the product here in state for the women to start the movement to this pole to place the bottle in the bin.

所以首先我们需要向上移动。
So first we need to move up.

所以这将是我们移动、人们向上移动的状态。
So this will be the state in which we move, people move up.

所以我可以说我们需要启用垂直移动。
So I can say we need to enable the vertical movement.

我可以简单地将其复制到这里。
I can simply copy this here.

并且我们需要使用机器人垂直装置代替机器人抓手装置并将它们移动到另一个状态状态。
And instead of the robot gripper device, we need to use the robot vertical device and move them to another state state.

50 个州,50 个。
50 states, 50.

这意味着机器人已经向上移动了。
It means that the robot has moved up.

我们需要向右移动。
We need to move that right.

所以这是一个正确的举动。
So here a right move.

正确的。
Right.

我实际上可以使用相同的状态、相同的代码,用副指挥官设置的水平、某种程度上水平的设备替换垂直设备。
And I actually can use the same state, the same code, replacing the vertical with the horizontal, somewhat horizontal device that the vice commander set to through.

当我们启用机器人或机器人水平装置时,这意味着我们位于机器人的右上方,这里我们将进入另一个状态state,60和60。
When we have the robot or robot horizontal device enabled, it means that we are on the top right side of the robot and here we will get to another state state, 60 and 60.

我们需要向下移动,向下移动。
We will need to move down, move down.

我们可以复制这部分。
We can copy this part.

状态 40 的部分,状态彼此非常相似。
The part of state 40, the states are quite similar to each other.

这是因为我们使用通用设备接口。
And this is because we use the generic device interface.

所以这里我们需要机器人垂直设备,该设备将是错误的,因为我们将向下移动并且我们将等待禁用。
So here we will need robot vertical device, the device coming to be false because we will be moving down and we will wait for disabled.

然后我们可以转到状态 70,而不是 70。
Then we can go to state 70, instead 70.

我们实际上到达了将瓶子扔进垃圾箱的位置。
We actually reached the position for the bottles to be dropped in the bin.

所以我们需要禁用夹具。
So we need to disable the gripper.

所以在这里我会说70将是我们真正使用该产品的一个。
So here I will say 70 will be the one in which we really use the product.

我们确实可以听到。
And we can actually hear.

复制此代码并将机器人垂直设备替换为机器人夹具设备,因为我们需要禁用它。
Copy this code and replace the robot vertical device with the robot gripper device, because we need to disable that.

转到状态 18,我们处于状态 18。
And move to state 18, we are in state 18.

实际上,我们不需要移动,因为我们需要通过水平移动回到这个位置之前。
Actually, we don't need to move because we need to move back to prior to this position by moving horizontally.

我们已经有一个州可以搬到这里了。
We already have a state to move here.

是的,我们检查它是否已经被禁用,但这对我们的程序没有损害。
Yea, we check for this to be already disabled, but this does no harm to our program.

所以这里我们可以直接进入状态 10,我们实际上已经编写了规则的代码周期,但我们只需要查看代码的状态、保持和停止以及紧急部分。
So here we can go directly to state 10 and we have actually already written the code cycle for the rule, but we need just to look into the state, the hold and stopping and emergency parts of the code.

那么让我们从紧急情况开始吧。
So let's start by the emergency.

一如既往。
As always.

我们需要禁用通用设备。
We need to disable the the generic devices.

所以我将从状态零复制这些代码行。
So I will copy these lines of codes here from state zero.

我将在这里蒸它们,并且当我们购买紧急情况时,我一定会启用启用的设备。
I will steam them here and I will certainly enable enabled device to force when we purchase the emergency.

那么这里我们需要管理这个停止,所以让我们创建一个停止状态,即一千个停止状态,在停止状态下,我们肯定需要禁用夹具。
Then here we need to manage this stop, so let's create the stop state that is one thousand stopping state and in the stopping state, we surely need to disable the gripper.

所以在这里我们将乘坐机器人抓手装置。
So here we will ride that robot gripper device.

该装置可以而且应该等同于跌倒。
That device can and should be equal to falls.

实际上,在这里我们不需要禁用向左、水平和垂直移动,因为我们只需要等待移动完成,这样我们就可以接受向上和向下移动相等,无论启用还是禁用,水平移动移动可以启用或禁用,并且需要禁用。
And actually here we do not need to disable either the left, the horizontal and vertical movement because we just need to wait for the movement to finish so we can accept the the up and down movement to be equal, either enabled or disabled, the horizontal movement to be either enabled or disabled, and it needs to be disabled.

所以在这里我会骑我会打开一个圆括号说如果机器人水平设备,该设备状态等于禁用或等于启用,重要的是状态不是启用或禁用并允许这里窗口。
So here I will ride I will open a round bracket saying that if the robot horizontal device, that device state is equal to disabled or it is equal to enabled, it is important that the state isn't enabling or disabling and allowed this window here.

因此,如果机器人水平装置、Zorrilla 以及前锋都发生这种情况。
So if this is happening for the robot horizontal device and also for Zorrilla and also forward.

垂直的,所以我将复制并粘贴它并替换罗伯特水平分界线。
Vertical one, so I will copy and paste this and replace Robert Horizontal Divide.

抱歉,罗伯特·水平 (Robert Horizo​​ntal) 声音与罗伯特·垂直 (Robert Vertical) 产生了分歧。
Sorry, Robert Horizontal The Voice with Robert Vertical divides.

罗伯特·垂直,副手。
Robert Vertical, the vice.

最后一个是我们有机器人 Rippert 禁用机器人抓手装置,该装置 Baystate 等于禁用。
And the last one will be that we have the robotic rippert disabled robot griper device, that device, the Baystate equal to disabled.

然后我们实际上可以进入零状态。
Then we can actually go to state zero.

好吧,实际上你们看起来一切都很好,我们实际上应该管理好一切。
OK, so actually you all where it all seems to be fine, we actually should have managed everything.

所以我们可以简单地尝试一下抱歉,我们需要删除我上次测试时放置的注释。
So we can simply try out sorry, we need to remove the comments here that I placed the last time when I tested the.

输送站。
Conveyor station.

那么让我们继续前进吧。
So let's move on and go to a.

去下载。
to download.

好的。
OK.

现在,让我们看看我们的机器。
So here, let's look at our machine now.

我们指的是可视化,让我们尝试启动我们的整个机器。
We mean visualization and let's try to start our whole machine.

正如我们上次测试的那样,传送站应该没问题。
The conveyor stations should be fine as we tested it last time.

现在,我们应该看到我们的机器人拾取模型。
And right now, we should see our robot picking up models.

好的,是的,它看起来运行良好,它完成了我们需要做的事情。
OK, yes, it seems to work well, it does what we needed to do.

它似乎对我们来说工作得很好。
It seems to work quite fine for us.

那么让我们尝试一下整个过程。
So let's try some whole procedure.

好的。
OK.

一名叛军保持在正确的位置。
A rebel held in the correct position.

让我们再试一次。
Let's try again.

再次抱歉,好吧,看起来效果很好。
Sorry again, OK, it seems to work quite fine.

我们实际上可以看到,如果我们坚持匹配机器人,那么实际上应该最终,呃,追逐身体。
We can actually see that if we hold to match the the robot should be should actually end up, uh, chasing the body's.

因此,存在一些重叠的个性化,从功能上来说,这不应该是一个问题。
So there is a little bit of overlapping individualisation, this shouldn't be an issue, functionally speaking.

好的。
OK.

所以这对我们来说应该没问题。
So this should be fine for us.

让我们尝试一些停止程序。
Let's try some stop procedure.

好吧,就到此为止了。
OK, it stop there.

我们重来。
Let's start again.

我们需要等待,因为需要一段时间才能拿到一瓶。
We need to wait for it because it takes a little while to get a bottle.

对于机器人来说,为什么要在移动时停下来,对吧?
To the to the robot, so why stop when it is moving, right?

现在?
Right now?

好的。
OK.

呃。
Uh.

实际上,我们正在放弃一些产品,但我们可以假设这对我们来说很好。
Actually, we are dropping some product, but we can assume for this to be, uh, fine for us.

我们实际上可以听到你以对角线的方式回到原来的位置,这很好。
We could actually hear you side going back to the position in a diagonal ways, and this is good.

还有。
And the.

在这里,我们尝试一下紧急情况,是的,它中途停止了,所以这对我们来说是可以的。
Here, let's try an emergency, yes, it stops midway, so this is OK for us.

好的,所以我们实际上已经完成了哦,抱歉,我想这里有问题。
OK, so we actually managed to get the complete oh, sorry, I guess there is something wrong here.

还有传送站,我看到这是。
And the conveyor station, I saw that this was.

实际上很活跃,让我在祈祷开始时再尝试一下紧急情况,这两个都是静止的。
Actually active, let me try again with an emergency up when a prayer starts, both of these are still.

来吧,让我看看发生了什么。
On, so let me see what is happening.

毫米。
Mm.

所以这里出了问题。
So something is wrong here.

让我调查一下。
Let me look into it.

是的,问题就在这里,因为当我们禁用 ANÍBAL 设备时,我们并没有设置该设备生效。
Yes, the problem is here because when we are disabling the ANÍBAL device, we are not setting the device come into force.

在紧急情况下也应该这样做,因为,呃,或者让我们说,当我们需要时,我们可以在启用它们时将其设置为等于力。
And this should be done as well in the emergency because, uh, or let's say that when we need, we can we should place this equal to force also here when we enable them.

那么这样一来,他们就不会开始了。
So in this way, they won't start.

所以我们当时做的就是把这个设置成通过,而不是强制设置它。
So what we are doing when we were doing back then is setting this through without setting this to force.

因此,如果这个设备 Scammon 等于 true,那么它就不会被,呃,覆盖。
So if this device Scammon was equal to true, it was not being, uh, and overwritten.

那么让我们再试一次。
So let's try again.

发生这种情况的情况是,当我按下紧急按钮时。
The condition in which it was happening is, was when I pressed an emergency.

正确的。
Right.

当,呃,有一种感觉或限制行动正在进行时。
When, uh, there was a feeling or capping action going on.

那么继续这里,让我们在这里尝试一下,开始。
So moving on here, let's try this here, start.

好的,开始吧。
OK, start.

是的,它运行良好。
Yes, it is working fine.

所以我们实际上成功地完成了代码,机器的功能代码,而且速度相当快。
So we actually managed to complete the code, the functional code for the machine, and it was quite fast.

正如我们在上一个项目中看到的那样。
And it is, again, as we saw in the previous project.

它非常模块化,非常容易替换,我们重用了很多代码并使用通用设备,我们有很多很多优点。
It is very modular, very simple to replace very we reuse a lot of code and using the general devices, we have many, many advantages.

因此,在接下来的视频中,我们将研究该项目的诊断部分。
So in the next videos, we will look into the diagnosis part of the project.

我们将使用退化设备实现默认检测,我们还将检测机器架构的下降,正如您在金库中看到的那样。
We will implement the default detection using degenerate devices and we will also detect the machine architecture falls, as you saw here in the vault with you.

我们还有另一个您专门用于该项目的产品。
We have another of these you used exactly for this project.

在这里,我们将尝试检测所有这些故障。
And here we will try to detect all of these faults.